#!user/bin/env python3
# -- coding: utf-8 --
"""
说明：免费代理ip常用网站https://ip.jiangxianli.com/?protocol=http，商业用途请使用付费ip。
网络上的代理都是这一秒可以下一秒不行了，你只能靠靠运气用用网上的 IP
"""
from config import ip
import requests


def set_requests():
    proxies = {
        'http': '183.156.73.75:10080'
    }
    user_agent = {
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32'
    }
    r = requests.get(url='http://www.4399.com/', headers=user_agent, proxies=ip.proxies)
    r.encoding = 'ANSI'
    print(r.text)

if __name__ == '__main__':
    set_requests()